#include <iostream>
using namespace std;

void Print(int num1, char op, int num2)
{
    cout << num1 << ':' << op << ':' << num2 << endl;
}


void Enum()
{
    cout << "********************************************" << endl;
    cout << "***     Usage：num1 operator num2 =      ***" << endl;
    cout << "***      operator = [+、-、*、/、%]       ***" << endl;
    cout << "********************************************" << endl;
}

int main()
{
    // 创建变量
    int num1 = 0;
    char op = 0;
    int num2 = 0;
    int ret = 0;
    // 打印菜单
    Enum();
    // 数据输入和处理
    while (true)
    {
        cin >> num1;
        while((op = getchar()) == ' ');
        cin >> num2;
        fflush(stdin);
        //Print(num1, op, num2);

        switch(op)
        {
            case '+':
            {
                ret = num1 + num2;
                cout << "ret = "<< ret << endl;
                break;
            }
            case '-':
            {
                ret = num1 - num2;
                cout << "ret = "<< ret << endl;
                break;
            }
            case '*':
            {
                ret = num1 * num2;
                cout << "ret = "<< ret << endl;
                break;
            }
            case '/':
            {
                if(num2 == 0)
                {
                    cout << "error：divisor is 0" << endl;
                    continue;
                }
                ret = num1 / num2;
                cout << "ret = "<< ret << endl;
                break;
            }
            case '%':
            {
                if(num2 == 0)
                {
                    cout << "error：divisor is 0" << endl;
                    continue;
                }
                ret = num1 % num2;
                cout << "ret = "<< ret << endl;
                break;
            }
            default:
            {
                cout << endl << "error：operator fault, please [+、-、*、/、%]" << endl;
                break;
            }
        }
    }
    return 0;
}